<form action="index" method="POST" id="frmReceived">
<div>
	<table width='100%'  border='0' cellspacing='0' cellpadding='0' class="table_title">
		<tr>
			<td class="large_title" style="padding-left:7px;text-align:left;">
				<!--Cac doi tuong hidden tren form-->
				<?php echo $this->formHidden("hdn_object_id_list","",null); ?>
				<?php echo $this->formHidden("hdn_filter_xml_tag_list",$this->filterXmlTagList,null); ?>
				<?php echo $this->formHidden("hdn_filter_xml_value_list",$this->filterXmlValueList,null); ?>
				<?php echo $this->formHidden("hdn_object_id",$this->sReceiveDocumentId,null); ?>
				<?php echo $this->formHidden("hdn_XmlTagValueList",$this->XmlTagValueList,null); ?>
				<?php echo $this->formHidden("hdn_history_back",$this->sUrl,null); ?>
				
				<?php echo $this->formHidden("hdn_position",$this->iPosition,null); ?>
				<?php echo $this->formHidden("hdn_owner",$this->sOwner,null); ?>
				
				<?php echo $this->formHidden("hdn_filter_xml_value_list",$this->filterXmlValueList,null); ?>
				
				<?=$this->bodyTitle;?>	
				
			</td>
		</tr>
	</table>
	<?php
		$arrConst = $this->arrConst;
	?>
	<div class="box container c1">
		<div class="pad">			
			<table cellpadding="0" cellspacing="0" width="98%" border="0">
				<col width="10%"/><col width="40%"/><col width="15%"/><col width="35%"/>
				<tr>
					<td class="normal_label" align="left">
						&nbsp;<?=$arrConst['_VI_TRI_HIEN_THI'] ?>
					</td>
					<td>
						<select style="width:50%;" id="C_POSITION" name="C_POSITION" onchange="actionUrl('');" class="textbox normal_label" >
						<?php
							$arrPosition = $this->arrPosition;
							echo Efy_Library::_generateSelectOption($arrPosition,'C_CODE','C_CODE','C_NAME',$this->iPosition);?>
						</select>
					</td>
					<td class="normal_label" align="left">
						&nbsp;Đơn vị triển khai
					</td>
					<td>
						<select style="width:60%;" id="C_OWNER" name="C_OWNER" onchange="actionUrl('');" class="textbox normal_label" >
						<option id="" name = "" value="">-- Chọn đơn vị triển khai --</option>
						<?php
							$arrPosition = $this->arrPosition;
							echo Efy_Library::_generateSelectOption($_SESSION['SesGetAllOwner'],'code','code','name',$this->sOwner);?>
						</select>
					</td>
				</tr>
			</table>
		</div>
	</div>
	
	<div style="margin-left:1%;text-align:right;width:98%;">
		<label>
			<a style="cursor:pointer;" class="small_link" onclick="actionUrl('../add/');"><?=$arrConst['_THEM'] ?>&nbsp;</a> 
			<a style="cursor:pointer;" class="small_link" onclick="btn_update_onclick(document.getElementsByName('chk_item_id'),'../edit/');">&nbsp;<?=$arrConst['_SUA'] ?>&nbsp;</a> 
			<a style="cursor:pointer;" class="small_link" onclick="btn_delete_onclick(document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id_list'),'../delete','<?=$this->UrlAjax?>','VB_DEN','T_DOC_RECEIVED_DOCUMENT');">&nbsp;<?=$arrConst['_XOA'] ?>&nbsp;</a>	 
		</label>
	</div>	
			
	<table cellpadding="0" cellspacing="0" border="0" width="98%" align="center" class="list_table2" id="table1">
		<?php			
		$delimitor = $this->delimitor;//Lay ky tu phan cach giua cac phan tu
		//Hien thi cac cot cua bang hien thi du lieu
		$StrHeader = explode("!~~!",$this->GenerateHeaderTable("5%" . $delimitor ."10%". $delimitor . "30%" . $delimitor . "40%" . $delimitor . "15%" 
										,'<input type="checkbox" name="chk_all_item_id" value="" onclick="checkbox_all_item_id(document.forms[0].chk_item_id);">' . $delimitor . $arrConst['_THU_TU'] . $delimitor .$arrConst['_TIEU_DE']. $delimitor . $arrConst['_DIA_CHI_LIEN_KET'] . $delimitor . $arrConst['_TINH_TRANG_HIEN_THI']
										,$delimitor));
		echo $StrHeader[0];						
		echo $StrHeader[1]; //Hien thi <col width = 'xx'><...		
			//Dinh nghia URL
			$sUrlEdit  = "../edit/";
			$arrResul = $this->arrResul;
			//var_dump($arrResul);
			$objFunction =	new	Efy_Function_DocFunctions()	;
			for($index = 0;$index < sizeof($arrResul);$index++){
				$v_current_style_name 		= "level0";
				$sDocumentId 				= $arrResul[$index]['PK_WEB_MENU'];		
				if($arrResul[$index]['C_LEVEL']=='0'){
					$iOrder = $arrResul[$index]['C_ORDER_LEVER1'];
				}
				if($arrResul[$index]['C_LEVEL']=='1'){
					$iOrder = $arrResul[$index]['C_ORDER_LEVER1'].'.'.$arrResul[$index]['C_ORDER_LEVER2'];
				}	
				if($arrResul[$index]['C_LEVEL']=='2'){
					$iOrder = $arrResul[$index]['C_ORDER_LEVER1'].'.'.$arrResul[$index]['C_ORDER_LEVER2'].'.'.$arrResul[$index]['C_ORDER_LEVER3'];
				}	
				$sTitle						 = $arrResul[$index]['C_NAME'];
				if($arrResul[$index]['C_LEVEL']=='1'){
					$sTitle = '&nbsp;&nbsp;&nbsp;'.$sTitle;
					$v_current_style_name 		= "level1";
				}
				if($arrResul[$index]['C_LEVEL']=='2'){
					$sTitle = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ '.$sTitle;
					$v_current_style_name 		= "level2";
				}
				
				$sUrl						 = $arrResul[$index]['C_URL'];
				$sStatus					 = $arrResul[$index]['C_STATUS'];
				if($sStatus=='1'){
					$sStatus = 'Hoạt động';
				}else{
					$sStatus = 'Không hoạt động';
				}
				?>
				<tr class="<?=$v_current_style_name?>">	
					<td align="center" style="padding-left:3px;padding-right:3px;" class="normal_label">
						<?=$this->formCheckbox('chk_item_id',$arrResul[$index]['PK_WEB_MENU'], array('checked' => false,'onclick' =>'selectrow(this)'));?>					
					</td>
					<td ondblclick="item_onclick('<?=$sDocumentId?>','<?=$sUrlEdit?>')" onclick="set_hidden(this,document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id'),'<?=$sDocumentId?>');" align="left"  style="padding-left:10px;padding-right:3px;" class="normal_label" ><?=$iOrder.'&nbsp;'?></td>													
					<td ondblclick="item_onclick('<?=$sDocumentId?>','<?=$sUrlEdit?>')" onclick="set_hidden(this,document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id'),'<?=$sDocumentId?>');" align="left"  style="padding-left:3px;padding-right:3px;" class="normal_label"><?=$sTitle.'&nbsp;';?></td>
					<td ondblclick="item_onclick('<?=$sDocumentId?>','<?=$sUrlEdit?>')" onclick="set_hidden(this,document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id'),'<?=$sDocumentId?>');" align="left"  style="padding-left:3px;padding-right:3px;" class="normal_label"><?=$sUrl.'&nbsp;';?></td>
					<td ondblclick="item_onclick('<?=$sDocumentId?>','<?=$sUrlEdit?>')" onclick="set_hidden(this,document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id'),'<?=$sDocumentId?>');" align="center" style="padding-left:3px;padding-right:3px;" class="normal_label"><?=$sStatus.'&nbsp;';?></td>		
				</tr><?php
			}					
		?>			
	</table>	
	<table width='100%'  border='0' cellspacing='0' cellpadding='0' align="center">
		<tr>
			<td style="padding-top: 10px; padding-bottom: 10px;" align="center" valign="middle">
				<input id="btn_add" name="btn_add" type="button" class="add_large_button" value="<?=$arrConst['_THEM'] ?>" onclick="actionUrl('../add/');">
				<input type="button" class="add_large_button" value="<?=$arrConst['_SUA'] ?>" onclick="btn_update_onclick(document.getElementsByName('chk_item_id'),'../edit/');">
				<input type="button" class="add_large_button" value="<?=$arrConst['_XOA'] ?>" onclick="btn_delete_onclick(document.getElementsByName('chk_item_id'),document.getElementById('hdn_object_id_list'),'../delete/','<?=$this->UrlAjax?>','VB_DEN','T_DOC_RECEIVED_DOCUMENT');">			
			</td>	
		</tr>
	</table>
</div>
</form>